# -*- coding:utf-8 -*-
# @Time : 22-1-11 上午8:38 
# @Author : zdy
# @File : UIEnterPsw.py
# desc:

from Class.Devices import *
from UI.EnterPsw import Ui_EnterPsw
from importQT import *

class UIEnterPsw(QtWidgets.QDialog, Ui_EnterPsw):
    def __init__(self):
        super(UIEnterPsw, self).__init__()
        self.setupUi(self)
        self.setWindowFlags(Qt.WindowCloseButtonHint)
        self.setFixedSize(self.width(), self.height())
        self.applyResource()
        self.setWindowTitle("请输入密码")
        self.btnOK.clicked.connect(self.btnOK_clicked)
        self.psw:str

    def applyResource(self):
        self.setWindowIcon(getIcon())

    def btnOK_clicked(self):
        self.psw = self.txtpsw.text()
        self.accept()
        self.close()
